'use strict'

module.exports = app => {
    const { sequelize, DataTypes } = app
    const { STRING, INTEGER, DATE } = DataTypes
    const tableName = 'home_banner'
    const Banner = sequelize.define(tableName, {
        banner_id: {
          type: INTEGER(20),
          primaryKey: true,
          autoIncrement: true
        },
        banner_url: {
          type: STRING(255)
        },
        desc: {
          type: STRING(255)
        },
        sort: {
          type: INTEGER(255)
        },
        status: {
          type: INTEGER(1)
        },
        // created_at: {
        //   type: DATE,
        // },
        // updated_at: {
        //   type: DATE,
        // },
      }, {
        modelName: tableName,
        comment: '首页轮播图表'
      })

    return Banner
}
